package cn.neusoft.neusoft_fz.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PaymentEntity {
    private BigDecimal serviceCharge;
    private Integer productNum;
    private BigDecimal productPrice;

    public BigDecimal calculateAmount() {
        BigDecimal num = new BigDecimal(productNum);
        return serviceCharge.add(num.multiply(productPrice));
    }
}
